package org.example.common

import java.sql.{Connection, Driver, DriverManager}

object DButils {
  val username="root"
  val pwd="root"

  val url="jdbc:mysql://localhost:3306/test?serverTimezone=UTC&characterEncoding=utf8"
  classOf[com.mysql.cj.jdbc.Driver]

  def getConn():Connection={
    DriverManager.getConnection(url,username,pwd)
  }
def closeCon(con:Connection):Unit = {
  con.close()
}
}
